Guard release version info against typos and desync - #473
Merged
Zac-HD merged 1 commit intoJul 28, 2026
Conversation
Release 27.7.1 escaped with a year-typo'd changelog header while __version__ still said 26.6.1: CI only checked that the changelog head was >= __version__, and the release job's update_version() silently patched the workspace copy before tagging and uploading (python-trio#469). - New always-on check: the newest changelog version may never be dated in the future, and its month must be a valid calendar month. - In --ensure-tag (release) mode, require the changelog head, __version__, and the usage.rst pre-commit rev to be exactly equal, and no longer run update_version() there - a mismatch now fails the release instead of being patched on the fly. Pre-commit keeps the auto-fix behavior. - Before creating a new tag for a x.y.1 release, require its year.month to be the current (or immediately previous) month; patch releases of an existing series are exempt. Tag existence is now checked via ls-remote, since a shallow CI checkout has no local tags. - Rename the 27.7.1 changelog entry to the intended 26.7.1 and sync __version__ and the usage.rst example accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cqsspf84UPK1Gg5rka8hRz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 27.7.1 escaped with a year-typo'd changelog header while
__version__still said 26.6.1: CI only checked that the changelog head was>= __version__, and the release job's update_version() silently patched the workspace copy before tagging and uploading (#469).__version__, and the usage.rst pre-commit rev to be exactly equal, and no longer run update_version() there - a mismatch now fails the release instead of being patched on the fly. Pre-commit keeps the auto-fix behavior.Merging this PR will re-release as 26.7.1, closing #469, and I'll then yank the bad release on PyPI.